/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author usuario
 */
@Embeddable
public class ItemventaPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "nroitem")
    private String nroitem;
    @Basic(optional = false)
    @Column(name = "idventa")
    private String idventa;

    public ItemventaPK() {
    }

    public ItemventaPK(String nroitem, String idventa) {
        this.nroitem = nroitem;
        this.idventa = idventa;
    }

    public String getNroitem() {
        return nroitem;
    }

    public void setNroitem(String nroitem) {
        this.nroitem = nroitem;
    }

    public String getIdventa() {
        return idventa;
    }

    public void setIdventa(String idventa) {
        this.idventa = idventa;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (nroitem != null ? nroitem.hashCode() : 0);
        hash += (idventa != null ? idventa.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ItemventaPK)) {
            return false;
        }
        ItemventaPK other = (ItemventaPK) object;
        if ((this.nroitem == null && other.nroitem != null) || (this.nroitem != null && !this.nroitem.equals(other.nroitem))) {
            return false;
        }
        if ((this.idventa == null && other.idventa != null) || (this.idventa != null && !this.idventa.equals(other.idventa))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "modelo.ItemventaPK[ nroitem=" + nroitem + ", idventa=" + idventa + " ]";
    }
    
}
